Optimal. Leaf size=46 \[ -\frac{\tanh ^{-1}\left (\frac{\cos (c+d x) (b-a \tan (c+d x))}{\sqrt{a^2+b^2}}\right )}{d \sqrt{a^2+b^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0307225, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {3509, 206} \[ -\frac{\tanh ^{-1}\left (\frac{\cos (c+d x) (b-a \tan (c+d x))}{\sqrt{a^2+b^2}}\right )}{d \sqrt{a^2+b^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3509
Rule 206
Rubi steps
\begin{align*} \int \frac{\sec (c+d x)}{a+b \tan (c+d x)} \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{1}{a^2+b^2-x^2} \, dx,x,\cos (c+d x) (b-a \tan (c+d x))\right )}{d}\\ &=-\frac{\tanh ^{-1}\left (\frac{\cos (c+d x) (b-a \tan (c+d x))}{\sqrt{a^2+b^2}}\right )}{\sqrt{a^2+b^2} d}\\ \end{align*}
Mathematica [A] time = 0.0450385, size = 45, normalized size = 0.98 \[ \frac{2 \tanh ^{-1}\left (\frac{a \tan \left (\frac{1}{2} (c+d x)\right )-b}{\sqrt{a^2+b^2}}\right )}{d \sqrt{a^2+b^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.031, size = 43, normalized size = 0.9 \begin{align*} 2\,{\frac{1}{d\sqrt{{a}^{2}+{b}^{2}}}{\it Artanh} \left ( 1/2\,{\frac{2\,a\tan \left ( 1/2\,dx+c/2 \right ) -2\,b}{\sqrt{{a}^{2}+{b}^{2}}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.92076, size = 312, normalized size = 6.78 \begin{align*} \frac{\log \left (-\frac{2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) +{\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a^{2} - b^{2} + 2 \, \sqrt{a^{2} + b^{2}}{\left (b \cos \left (d x + c\right ) - a \sin \left (d x + c\right )\right )}}{2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) +{\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}}\right )}{2 \, \sqrt{a^{2} + b^{2}} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec{\left (c + d x \right )}}{a + b \tan{\left (c + d x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.58734, size = 100, normalized size = 2.17 \begin{align*} -\frac{\log \left (\frac{{\left | 2 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 2 \, b - 2 \, \sqrt{a^{2} + b^{2}} \right |}}{{\left | 2 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 2 \, b + 2 \, \sqrt{a^{2} + b^{2}} \right |}}\right )}{\sqrt{a^{2} + b^{2}} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]